package cn.edu.scau.cmi.linhongyu.composite.consistent;

import java.util.Set;

public class ConsistentLeaf extends ConsistentComponent{
	
	private String name;
	



	@Override
	public ConsistentComponent addChild(ConsistentComponent child) {
		System.out.println("对不起，该节点时叶节点，不能添加子节点");
		return this;
	}

	@Override
	public ConsistentComponent deleteChild(ConsistentComponent child) {
		System.out.println("对不起，该节点是叶节点，没有子节点可以删除删除");
		return this;
	}

	@Override
	public Set<ConsistentComponent> getChildren() {
		System.out.println("对不起，该节点是叶节点，没有子节点");
		return null;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


}
